package com.xbongbong.saas.enums.dictionary;

import com.xbongbong.i18n.util.I18nMessageUtil;
import lombok.Getter;

import java.util.Objects;

/**
 * 数据字典-支付方式
 *
 * @author haibin.zhang
 * @version v1.0
 * @date 2019/2/26 10:19
 * @since v1.0
 */
@Getter
public enum PayMethodEnum {

    // 支付方式
    ONLINE_TRANSFER("1", "enum.payMethod.name.online_transfer", "onlineTransfer"),


    CASH("2", "enum.payMethod.name.cash", "cash"),


    CHECK("3", "enum.payMethod.name.check", "check"),


    WIRE_TRANSFER("4", "enum.payMethod.name.wire_transfer", "wireTransfer"),


    ACCEPTANCE_DRAFT("5", "enum.payMethod.name.acceptance_draft", "acceptanceDraft"),
    ;

    private String code;
    private String name;
    private String attr;

    PayMethodEnum(String code, String name, String attr) {
        this.code = code;
        this.name = name;
        this.attr = attr;
    }

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }
}
